import Vue from 'vue'
import Router from 'vue-router'
const Index = () => import('/page/index.vue')
const Login = () => import('/page/Login/login.vue')
const Register = () => import('/page/Login/register.vue')
const Home = () => import('/page/Home/index.vue')
const Game = () => import('/page/Goods/game.vue')
const GameItem = () => import('/page/Goods/item.vue')
const Join = () => import('/page/Join/join.vue')
const Security = () => import('/page/Security/security.vue')
const About = () => import('/page/About/about.vue')
const Transfer = () => import('/page/Transfer/goodsTransfer.vue')
const goodsTransfer = () => import('/page/Transfer/goodsTransfer.vue')
const noticeTransfer = () => import('/page/Transfer/noticeTransfer.vue')
const Category = () => import('/page/Goods/category.vue')
const Notice = () => import('/page/Notice/notice.vue')
const Leveling = () => import('/page/leveling/leveling.vue')
const LevelingItem = () => import('/page/leveling/levelingItem.vue')

Vue.use(Router)
export default new Router({
	mode: 'history',
  routes: [
    {
      path: '/',
      component: Index,
      name: 'index',
      redirect: '/index',
      children: [
        {path: 'index', component: Home},
        {path: 'game', name:'game', component: Game},
        {path: 'category', name: 'category', component: Category},
        {path: 'item', name: 'item', component: GameItem},
        {path: 'join', name: 'join', component: Join},
        {path: 'goodsTransfer', name: 'goodsTransfer', component: goodsTransfer},
        {path: 'security', name: 'security', component: Security},
        {path: 'about', name: 'about', component: About},
        {path: 'noticeTransfer', name: 'noticeTransfer', component: noticeTransfer},
      	{path: 'notice', name: 'notice', component: Notice},
        {path: 'leveling', name: 'leveling', component: Leveling},
        {path: 'levelingItem', name: 'levelingItem', component: LevelingItem}
      ]
    },
    {path: '/login', name: 'login', component: Login},
    {path: '/register', name: 'register', component: Register},
    {path: '*', redirect: '/index'}
  ]
})
